<div class="full_w">
    <div class="h_title"><?php echo Yii::t('AdmincpModule.admincp', 'Add Item'); ?></div>
    <?php 
        foreach(Yii::app()->admin->getFlashes() as $key => $message){
            echo '<div class="n_'.$key.'"><p>'.$message."</p></div>\n";
        }
    ?>
    <form action="" method="post" id="frmUser">
     	<div class="element">
            <label>Title<span class="red">*</span></label> 
            <input type="text" name="banner[banner_name]" id="banner_name" class="text required" value="<?php echo isset($arrItemInfo['banner_name'])?$arrItemInfo['banner_name']:null; ?>" autocomplete="off">
        </div>
        <div class="element">
            <label>Description</label>
            <textarea class="textarea" name="banner[banner_description]" id="banner_description"><?php echo isset($arrItemInfo['banner_description'])?$arrItemInfo['banner_description']:null; ?></textarea>
        </div> 
    	<div class="element">
            <label>Link <span class="red">*</span></label>
            <input type="text" name="banner[banner_link]" id="banner_link" class="text required" value="<?php echo isset($arrItemInfo['banner_link'])?$arrItemInfo['banner_link']:null; ?>" autocomplete="off">
        </div>
        <div class="element">
            <label>Target</label>
            <select name="banner[banner_linktarget]" id="banner_linktarget" tabindex="4">
                <option value="_self">_self</option>
                <option value="_blank">_blank</option>
                <option value="_top">_top</option>
                <option value="_parent">_parent</option>
                <option value="framename">framename</option>
            </select>
        </div>
        <div class="element">
            <label>File</label>
            <input type="text" name="banner[banner_file]" id="banner_file" class="text" value="<?php echo isset($arrItemInfo['banner_file'])?$arrItemInfo['banner_file']:null; ?>"> 
            [<a class="fancybox" onclick="Media.show({callback: function(src){$('#banner_file').val(src); $.fancybox.close();}, folder: 'advertisement'});" href="javascript:void(0);">Media</a>] 
        </div>
                
        <div class="element">
            <label>Status</label>
            <select name="banner[banner_status]" id="banner_status">
            	<option value="0">Inactive</option>
                <option value="1" <?php if(isset($arrItemInfo['banner_status']) && $arrItemInfo['banner_status'] == '1'): ?>selected<?php endif; ?>>Active</option>
            </select>
        </div> 
        
        <?php if(!empty($arrZones)): ?>
        <div class="element">
            <label for="category">Linked Zones</label>
            <div style=" max-height: 200px; min-height: 42px; overflow: auto;">
                <ul style="list-style-type: none;">
                <?php foreach($arrZones as $R): ?>
                	<li style="float:left; width:200px;">
                        <input type="checkbox" style="float:left;" name="zones[]" id="zone_<?php echo $R['zone_id']; ?>" value="<?php echo $R['zone_id']; ?>" <?php if(in_array($R['zone_id'], $arrItemInfo['zones'])):?>checked<?php endif; ?>> 
                 		<label style="float:left" for="zone_<?php echo $R['zone_id']; ?>"><?php echo $R['zone_name'];?></label>
                    </li>
				 <?php endforeach; ?>
                 </ul>
             </div>
        </div>
        <?php endif; ?>
            
        <div class="entry">
         	<input type="hidden" name="banner[campaign_id]" id="campaign_id" value="<?php echo $intCampaignId; ?>">
            <input type="hidden" name="id" id="id" value="<?php echo isset($arrItemInfo['banner_id'])?$arrItemInfo['banner_id']:null; ?>">
            <button type="submit">Submit</button> <button>Cancel</button>
        </div>
    </form>
</div>
<script type="text/javascript" src="js/media-popup.js"></script>